[IA64] Fix ptc.ga emulation
authorAlex Williamson <alex.williamson@hp.com>
Mon, 14 May 2007 17:52:01 +0000 (11:52 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Mon, 14 May 2007 17:52:01 +0000 (11:52 -0600)
commit8522e94583477408704b779a5277aaa633e241ee
tree5fd5c3acfab0a233e56a289ad8cf33db5ea01e74
parentf1bfaa9e03c31d17291ad64f17a422ab0756f8a0
[IA64] Fix ptc.ga emulation

cset14829(c42ae7839750) was incomplete.

The region register 0 will be clobbered as follows.

time    pcpu0   pcpu1   pcpu2
 |      vcpu0   vcpu1   idle  // assignment of vcpu
 V
        1.vcpu0 issues ptc.ga
        2.vcpu0 sends IPI to vcpu1(pcpu1)
                3.vcpu1 migrates from pcpu1 to pcpu2
                4.pcpu1 receives IPI of 2 and exec ptc_ga_remote_func()
                5.pcpu1 saves and modifies vrr[0]
                        6.vcpu1(pcpu2) modifies vrr[0]
                7.pcpu1 restores vrr[0]         // vrr[0] of 6 is lost

Windows will crash due to this issue.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen/arch/ia64/vmx/vmmu.c